package net.hn.hnms.biz.safety.monitor.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * 智呈物联 pan'sx
 * 2022/8/31 14:15
 * 1.0 version
 */
@Entity
@Table(name = "dwd_aqjk_now_base_sensorinfo", schema = "aqjk", catalog = "huaneng-safety")
@ApiModel("监测器")
public class AqjkNowBaseSensorinfoEntity {
    private String mineCode;
    @ApiModelProperty("传感器编码")
    private String pointCode;
    private String systemCode;
    private String stationCode;
    private String sensorType;

    @ApiModelProperty("传感器类型")
    private String sensorTypeName;
    @ApiModelProperty("测点数值单位")
    private String valueUnit;
    private String pointValueType;
    private Timestamp installTime;
    private BigDecimal highRange;
    private BigDecimal lowRange;
    @ApiModelProperty("上限报警门限")
    private BigDecimal upperLimit;
    private BigDecimal upperLimitRelease;
    private BigDecimal lowerLimit;
    private BigDecimal lowerLimitRelease;
    @ApiModelProperty("上限断电门限")
    private BigDecimal upperLimitPoweroff;
    private BigDecimal upperLimitPoweron;
    private BigDecimal lowerLimitPoweroff;
    private BigDecimal lowerLimitPoweron;
    private String openDesc;
    private String stopDesc;
    @ApiModelProperty("传感器位置")
    private String pointMonitorLocation;
    private BigDecimal xCoordinate;
    private BigDecimal yCoordinate;
    private BigDecimal zCoordinate;
    private String pointRel;
    private String isSync;
    private Timestamp uploadTime;
    private String dataFlag;
    private Timestamp createTime;
    private String testg;
    @ApiModelProperty("上传时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "Asia/Shanghai"
    )
    private Timestamp updateTime;
    private Timestamp deleteTime;
    private String workfaceCode;
    private String isImportant;
    @Id
    private Long id;

    @Transient
    @ApiModelProperty("当前值")
    private String currentValue;

    @Transient
    public String getCurrentValue() {
        return currentValue;
    }

    public void setCurrentValue(String currentValue) {
        this.currentValue = currentValue;
    }

    @Basic
    @Column(name = "mine_code")
    public String getMineCode() {
        return mineCode;
    }

    public void setMineCode(String mineCode) {
        this.mineCode = mineCode;
    }

    @Id
    @Column(name = "point_code")
    public String getPointCode() {
        return pointCode;
    }

    public void setPointCode(String pointCode) {
        this.pointCode = pointCode;
    }

    @Basic
    @Column(name = "system_code")
    public String getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(String systemCode) {
        this.systemCode = systemCode;
    }

    @Basic
    @Column(name = "station_code")
    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    @Basic
    @Column(name = "sensor_type")
    public String getSensorType() {
        return sensorType;
    }

    public void setSensorType(String sensorType) {
        this.sensorType = sensorType;
    }

    @Basic
    @Column(name = "value_unit")
    public String getValueUnit() {
        return valueUnit;
    }

    public void setValueUnit(String valueUnit) {
        this.valueUnit = valueUnit;
    }

    @Basic
    @Column(name = "point_value_type")
    public String getPointValueType() {
        return pointValueType;
    }

    public void setPointValueType(String pointValueType) {
        this.pointValueType = pointValueType;
    }

    @Basic
    @Column(name = "install_time")
    public Timestamp getInstallTime() {
        return installTime;
    }

    public void setInstallTime(Timestamp installTime) {
        this.installTime = installTime;
    }

    @Basic
    @Column(name = "high_range")
    public BigDecimal getHighRange() {
        return highRange;
    }

    public void setHighRange(BigDecimal highRange) {
        this.highRange = highRange;
    }

    @Basic
    @Column(name = "low_range")
    public BigDecimal getLowRange() {
        return lowRange;
    }

    public void setLowRange(BigDecimal lowRange) {
        this.lowRange = lowRange;
    }

    @Basic
    @Column(name = "upper_limit")
    public BigDecimal getUpperLimit() {
        return upperLimit;
    }

    public void setUpperLimit(BigDecimal upperLimit) {
        this.upperLimit = upperLimit;
    }

    @Basic
    @Column(name = "upper_limit_release")
    public BigDecimal getUpperLimitRelease() {
        return upperLimitRelease;
    }

    public void setUpperLimitRelease(BigDecimal upperLimitRelease) {
        this.upperLimitRelease = upperLimitRelease;
    }

    @Basic
    @Column(name = "lower_limit")
    public BigDecimal getLowerLimit() {
        return lowerLimit;
    }

    public void setLowerLimit(BigDecimal lowerLimit) {
        this.lowerLimit = lowerLimit;
    }

    @Basic
    @Column(name = "lower_limit_release")
    public BigDecimal getLowerLimitRelease() {
        return lowerLimitRelease;
    }

    public void setLowerLimitRelease(BigDecimal lowerLimitRelease) {
        this.lowerLimitRelease = lowerLimitRelease;
    }

    @Basic
    @Column(name = "upper_limit_poweroff")
    public BigDecimal getUpperLimitPoweroff() {
        return upperLimitPoweroff;
    }

    public void setUpperLimitPoweroff(BigDecimal upperLimitPoweroff) {
        this.upperLimitPoweroff = upperLimitPoweroff;
    }

    @Basic
    @Column(name = "upper_limit_poweron")
    public BigDecimal getUpperLimitPoweron() {
        return upperLimitPoweron;
    }

    public void setUpperLimitPoweron(BigDecimal upperLimitPoweron) {
        this.upperLimitPoweron = upperLimitPoweron;
    }

    @Basic
    @Column(name = "lower_limit_poweroff")
    public BigDecimal getLowerLimitPoweroff() {
        return lowerLimitPoweroff;
    }

    public void setLowerLimitPoweroff(BigDecimal lowerLimitPoweroff) {
        this.lowerLimitPoweroff = lowerLimitPoweroff;
    }

    @Basic
    @Column(name = "lower_limit_poweron")
    public BigDecimal getLowerLimitPoweron() {
        return lowerLimitPoweron;
    }

    public void setLowerLimitPoweron(BigDecimal lowerLimitPoweron) {
        this.lowerLimitPoweron = lowerLimitPoweron;
    }

    @Basic
    @Column(name = "open_desc")
    public String getOpenDesc() {
        return openDesc;
    }

    public void setOpenDesc(String openDesc) {
        this.openDesc = openDesc;
    }

    @Basic
    @Column(name = "stop_desc")
    public String getStopDesc() {
        return stopDesc;
    }

    public void setStopDesc(String stopDesc) {
        this.stopDesc = stopDesc;
    }

    @Basic
    @Column(name = "point_monitor_location")
    public String getPointMonitorLocation() {
        return pointMonitorLocation;
    }

    public void setPointMonitorLocation(String pointMonitorLocation) {
        this.pointMonitorLocation = pointMonitorLocation;
    }

    @Basic
    @Column(name = "x_coordinate")
    public BigDecimal getxCoordinate() {
        return xCoordinate;
    }

    public void setxCoordinate(BigDecimal xCoordinate) {
        this.xCoordinate = xCoordinate;
    }

    @Basic
    @Column(name = "y_coordinate")
    public BigDecimal getyCoordinate() {
        return yCoordinate;
    }

    public void setyCoordinate(BigDecimal yCoordinate) {
        this.yCoordinate = yCoordinate;
    }

    @Basic
    @Column(name = "z_coordinate")
    public BigDecimal getzCoordinate() {
        return zCoordinate;
    }

    public void setzCoordinate(BigDecimal zCoordinate) {
        this.zCoordinate = zCoordinate;
    }

    @Basic
    @Column(name = "point_rel")
    public String getPointRel() {
        return pointRel;
    }

    public void setPointRel(String pointRel) {
        this.pointRel = pointRel;
    }

    @Basic
    @Column(name = "is_sync")
    public String getIsSync() {
        return isSync;
    }

    public void setIsSync(String isSync) {
        this.isSync = isSync;
    }

    @Basic
    @Column(name = "upload_time")
    public Timestamp getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Timestamp uploadTime) {
        this.uploadTime = uploadTime;
    }

    @Basic
    @Column(name = "data_flag")
    public String getDataFlag() {
        return dataFlag;
    }

    public void setDataFlag(String dataFlag) {
        this.dataFlag = dataFlag;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "testg")
    public String getTestg() {
        return testg;
    }

    public void setTestg(String testg) {
        this.testg = testg;
    }

    @Basic
    @Column(name = "update_time")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "delete_time")
    public Timestamp getDeleteTime() {
        return deleteTime;
    }

    public void setDeleteTime(Timestamp deleteTime) {
        this.deleteTime = deleteTime;
    }

    @Basic
    @Column(name = "workface_code")
    public String getWorkfaceCode() {
        return workfaceCode;
    }

    public void setWorkfaceCode(String workfaceCode) {
        this.workfaceCode = workfaceCode;
    }

    @Basic
    @Column(name = "is_important")
    public String getIsImportant() {
        return isImportant;
    }

    public void setIsImportant(String isImportant) {
        this.isImportant = isImportant;
    }

    @Basic
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getSensorTypeName() {
        return sensorTypeName;
    }

    public void setSensorTypeName(String sensorTypeName) {
        this.sensorTypeName = sensorTypeName;
    }



    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AqjkNowBaseSensorinfoEntity that = (AqjkNowBaseSensorinfoEntity) o;
        return Objects.equals(mineCode, that.mineCode) &&
                Objects.equals(pointCode, that.pointCode) &&
                Objects.equals(systemCode, that.systemCode) &&
                Objects.equals(stationCode, that.stationCode) &&
                Objects.equals(sensorType, that.sensorType) &&
                Objects.equals(valueUnit, that.valueUnit) &&
                Objects.equals(pointValueType, that.pointValueType) &&
                Objects.equals(installTime, that.installTime) &&
                Objects.equals(highRange, that.highRange) &&
                Objects.equals(lowRange, that.lowRange) &&
                Objects.equals(upperLimit, that.upperLimit) &&
                Objects.equals(upperLimitRelease, that.upperLimitRelease) &&
                Objects.equals(lowerLimit, that.lowerLimit) &&
                Objects.equals(lowerLimitRelease, that.lowerLimitRelease) &&
                Objects.equals(upperLimitPoweroff, that.upperLimitPoweroff) &&
                Objects.equals(upperLimitPoweron, that.upperLimitPoweron) &&
                Objects.equals(lowerLimitPoweroff, that.lowerLimitPoweroff) &&
                Objects.equals(lowerLimitPoweron, that.lowerLimitPoweron) &&
                Objects.equals(openDesc, that.openDesc) &&
                Objects.equals(stopDesc, that.stopDesc) &&
                Objects.equals(pointMonitorLocation, that.pointMonitorLocation) &&
                Objects.equals(xCoordinate, that.xCoordinate) &&
                Objects.equals(yCoordinate, that.yCoordinate) &&
                Objects.equals(zCoordinate, that.zCoordinate) &&
                Objects.equals(pointRel, that.pointRel) &&
                Objects.equals(isSync, that.isSync) &&
                Objects.equals(uploadTime, that.uploadTime) &&
                Objects.equals(dataFlag, that.dataFlag) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(testg, that.testg) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(deleteTime, that.deleteTime) &&
                Objects.equals(workfaceCode, that.workfaceCode) &&
                Objects.equals(isImportant, that.isImportant) &&
                Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mineCode, pointCode, systemCode, stationCode, sensorType, valueUnit, pointValueType, installTime, highRange, lowRange, upperLimit, upperLimitRelease, lowerLimit, lowerLimitRelease, upperLimitPoweroff, upperLimitPoweron, lowerLimitPoweroff, lowerLimitPoweron, openDesc, stopDesc, pointMonitorLocation, xCoordinate, yCoordinate, zCoordinate, pointRel, isSync, uploadTime, dataFlag, createTime, testg, updateTime, deleteTime, workfaceCode, isImportant, id);
    }
}
